import request from '@/utils/request'

// 新增 新闻 公告 红头文件
export function noticeAdd(data) {
  return request({
    url: '/system/notice',
    method: 'post',
    data: data
  })
}
export function noticeEdit(data) {
  return request({
    url: '/system/notice',
    method: 'put',
    data: data
  })
}
// 删除通知公告

export function noticeDel(data) {
  return request({
    url: '/system/notice/' + data,
    method: 'DELETE',
    data: data
  })
}
export function noticeInfo(data,url) {
  return request({
    url: '/system/notice/' + data + '?ipAddress='+ url,
    method: 'get',
  })
}
// 获取通知公告列表 
export function noticeList(query) {
  return request({
    url: '/system/notice/list',
    method: 'get',
    params: query
  })
}
//是否显示

export function statusChange(id, status) {
  return request({
    url: '/system/notice/statusChange/' + id + '/' + status,
    method: 'get',
  })
}

//是否置顶
export function isTopChange(id, status) {
  return request({
    url: '/system/notice/isTopChange/' + id + '/' + status,
    method: 'get',
  })
}




